<script type="text/template" id="attnSetting-template">
	<div class="attnSetting-body">
		<div class="attn-rules">
			<div class="attn-rules-header">考勤规则列表
				<button id="addRule" class="btn btn-default" style="color: #777; margin-top: 10px;float:right;">
					<i class="fa fa-plus" aria-hidden="true"></i>
				</button>
			</div>
			<div class="attn-rules-table"></div>
		</div>
		<div class="add-attn-rule">
			
		</div>
		<div class="rule-target">
			<div class="attn-rules-header">执行对象</div>
			<div id="treeBox" class="tree-box">
				<ul id="treeList" class="ztree"></ul>
			</div>
		</div>
	</div>
</script>
<script type="text/template" id="rule-detail-template">
	<@
		var name = data ? data.name : "";
		var checkIn = data ? data.checkIn : "";
		var checkOut = data ? data.checkOut : "";
		var workday = data ? data.workday : "";
		var lateMin = data ? data.lateMin : "";
		var leaveMin = data ? data.leaveMin : "";
		var totalTimes = data ? data.totalTimes : "";
		var totalMins = data ? data.totalMins : "";
		var id = data ? data.id : "";
	@>
	<div class="attn-box">
		<div class="attn-row">
			<div class="attn-row-left">规则名称：</div>
			<div class="attn-row-right"><input id="name" class="ht-data" type="text" style="width:50%;" value="<@=name@>"></div>
		</div>
	</div>
	<div class="attn-box">
		<div class="attn-box-title">工作时间段</div>
		<div class="attn-row">
			<div class="attn-row-left">签到时间：</div>
			<div class="attn-row-right">
				<div class="timepicker date">
                	<input id="checkIn" class="ht-data" style="width:calc(100% - 12px);" type="text" value="<@=checkIn@>" readonly>
                	<span class="date-icon add-on"><i class="fa fa-calendar"></i></span>
            	</div>
			</div>
		</div>
		<div class="attn-row-holder"></div>
		<div class="attn-row">
			<div class="attn-row-left">签退时间：</div>
			<div class="attn-row-right">
				<div class="timepicker date">
                	<input id="checkOut" class="ht-data" style="width:calc(100% - 12px);" type="text" value="<@=checkOut@>" readonly>
                	<span class="date-icon add-on"><i class="fa fa-calendar"></i></span>
            	</div>
			</div>
		</div>
	</div>
	<div class="attn-box">
		<div class="attn-box-title">工作日设定
			<div class="attn-box-title-ex">
				<div class="property-all" name="workday">
                    <div class="user-check <@=(workday.split(',').length==7?'checked':'')@>"></div>
                    <div class="user-check-text ellipsis">全选</div>
                </div>
			</div>
		</div>
		<div class="attn-row">
			<div class="property" name="workday">
                <div class="user-check <@=(workday.indexOf('1')>=0?'checked':'')@>" value="1"></div>
                <div class="user-check-text ellipsis">星期一</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('2')>=0?'checked':'')@>" value="2"></div>
                <div class="user-check-text ellipsis">星期二</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('3')>=0?'checked':'')@>" value="3"></div>
                <div class="user-check-text ellipsis">星期三</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('4')>=0?'checked':'')@>" value="4"></div>
                <div class="user-check-text ellipsis">星期四</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('5')>=0?'checked':'')@>" value="5"></div>
                <div class="user-check-text ellipsis">星期五</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('6')>=0?'checked':'')@>" value="6"></div>
                <div class="user-check-text ellipsis">星期六</div>
            </div>
            <div class="property" name="workday"  >
                <div class="user-check <@=(workday.indexOf('7')>=0?'checked':'')@>" value="7"></div>
                <div class="user-check-text ellipsis">星期日</div>
            </div>
		</div>
	</div>
	<div class="attn-box">
		<div class="attn-box-title">高级设置</div>
		<div class="attn-row">
			<div class="attn-row-left">迟到：</div>
			<div class="attn-row-right">
				<input id="lateMin" class="ht-data" type="text" style="width:15%;" value="<@=lateMin@>">
				<div class="attn-row-text">分钟不计迟到</div>
			</div>
		</div>
		<div class="attn-row-holder"></div>
		<div class="attn-row">
			<div class="attn-row-left">早退：</div>
			<div class="attn-row-right">
				<input id="leaveMin" class="ht-data" type="text" style="width:15%;" value="<@=leaveMin@>">
				<div class="attn-row-text">分钟不计早退</div>
			</div>
		</div>
		<div class="attn-row-holder"></div>
		<div class="attn-row">
			<div class="attn-row-left" style="width:180px;">每月累计迟到早退次数：</div>
			<div class="attn-row-right" style="width:calc(100% - 180px);">
				<input id="totalTimes" class="ht-data" type="text" style="width:70px;" value="<@=totalTimes@>">
				<div class="attn-row-text">次，累计不超过</div>
				<div class="attn-row-text"><input id="totalTimes" class="ht-data" type="text" style="width:70px;" value="<@=totalTimes@>"></div>
				<div class="attn-row-text">分钟</div>
			</div>
		</div>
	</div>
	<div class="attn-foot">
        <button class="btn btn-blue save-rule" data-id="<@=id@>">保存</button>
    </div>
</script>